//package com.huyun.web.zookeeper;
//
//import org.apache.curator.framework.CuratorFramework;
//import org.apache.curator.framework.CuratorFrameworkFactory;
//import org.apache.curator.retry.RetryOneTime;
//import org.aspectj.lang.annotation.Before;
//
///**
// * zk 节点创建使用
// * @author huyunqiang
// * @Date 2020/1/2 11:18
// */
//
//public class NodeTestZK {
//    @Before("")
//    public void before() {
////          非Fluent风格
////          CuratorFramework curatorFramework = CuratorFrameworkFactory.newClient(zkPath, new RetryOneTime(100));
////          System.out.println(curatorFramework.getState());
////          curatorFramework.start();
////          System.out.println(curatorFramework.getState());
////          非Fluent风格
////          CuratorFramework curatorFramework = CuratorFrameworkFactory.newClient(zkPath, new RetryOneTime(100));
////          System.out.println(curatorFramework.getState());
////          curatorFramework.start();
////          System.out.println(curatorFramework.getState());
//        // Fluent风格
//        CuratorFramework  curatorFramework = CuratorFrameworkFactory.builder()
//                .connectString("192.100.3.51:2181,192.100.3.52:2181,192.100.3.53:2181")
//                .retryPolicy(new RetryOneTime(1000)) //重试策略
//                .namespace("zfpt") // 命名空间
//                .build();
//        curatorFramework.start();
//    }
//
//
//}
